<style type="text/css">
    .left-panel {
        float: left;
        width: 75%;
    }
    
    .right-panel {
        float: right;
        width: 20%;
        padding-left: 40px;
    }
</style>

<script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/scripts/nicedit/nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() {
	new nicEditor({
		//buttonList : ['bold','italic','underline','upload'],
		iconsPath:'<?php echo Yii::app()->baseUrl; ?>/scripts/nicedit/nicEditorIcons.gif',
		uploadURI : '<?php echo Yii::app()->baseUrl; ?>/scripts/nicedit/nicUpload.php', 
	}).panelInstance('content_area');
});

bkLib.onDomLoaded(function() {
	new nicEditor({
		//buttonList : ['bold','italic','underline','upload'],
		iconsPath:'<?php echo Yii::app()->baseUrl; ?>/scripts/nicedit/nicEditorIcons.gif',
		uploadURI : '<?php echo Yii::app()->baseUrl; ?>/scripts/nicedit/nicUpload.php', 
	}).panelInstance('short_intro');
});
</script>
<script type="text/javascript">
 
</script>

<form name="create_form" id="create_form" method="POST" action="?r=post/create" enctype="multipart/form-data">
    <div class="left-panel">
        <h3>Thông tin cơ bản</h3><hr />
            <td><label for="normal">Title</label></td>
            <td><input name="title" id="title"  type="text" size="70" style="width:650px"></td>
            <td><label for="normal">Slug</label></td>
            <td><input type="text" value="" name="slug" id="slug" style="width:650px"></td>
            <label>Tags</label>
            <input name="tags" id="tag" type="text" size="70" style="width:650px">
            <label>Nguồn</label>
            <input name="source" id="source" type="text" size="70" style="width:650px">

                    
       
        <br />
        <label for="normal">Giới thiệu</label>
        <textarea  id="short_intro" name="short_intro" rows="3" style="width: 98%"></textarea>
        <label for="normal">Nội dung</label>
        <textarea  id="content_area" name="content" rows="12" style="width: 98%"></textarea>
        <br />
        <table border="0">
            <tr>
                <td>
                    <label for="normal">Hình đại diện</label>
                    <input name="thumb" id="thumb" type="file"  size="20" style="opacity: 0;">
                    <input type ="hidden" name="thumb" id="thumb_url"/>
                </td>
            </tr>
            <tr>
                <td>
                    <div><img id="thumb_content" src="" style="width:200px;height:200px;margin-top:15px"></img></div>
                    <div id="thumb_status"></div>
                </td>
            </tr>
        </table>
        <br />
        
         <span style="clear:left"></span>
         <br />
         
      <table>
        <tr>
            <td width="330"><label>Thời điểm hiển thị </label></td>
            <td><label>Thời điểm kết thúc</label></td>
        </tr>
       
       <tr>
         <td>
             <table>
                <tr>
                    <td><label>Giờ</label></td>
                    <td><label>Phút</label></td>    
                    <td><label>Ngày</label></td>
                    <td><label>Tháng</label></td>
                    <td><label>Năm</label></td>
                </tr>
                <tr>
                    <td><input name="hour_start_time"  type="text" maxlength="2" style="width:35px"></td>
                    <td><input name="min_start_time"  type="text" maxlength="2" style="width:35px"></td>
                    <td><input name="day_start_time" value="<?php echo date('d',$pagevals['time']); ?>" type="text" maxlength="2" style="width:35px"></td>
                    <td><input name="mon_start_time" value="<?php echo date('m',$pagevals['time']); ?>"  type="text" maxlength="2" style="width:35px"></td>
                    <td><input name="year_start_time" value="<?php echo date('Y',$pagevals['time']); ?>" type="text" maxlength="4" style="width:35px"></td>
                </tr>
            </table>
         </td>
         <td>
            <table>
                <tr>
                    <td><label>Giờ</label></td>
                    <td><label>Phút</label></td>    
                    <td><label>Ngày</label></td>
                    <td><label>Tháng</label></td>
                    <td><label>Năm</label></td>
                </tr>
                <tr>
                    <td><input name="hour_end_time"  type="text" maxlength="2" style="width:35px"></td>
                    <td><input name="min_end_time"  type="text" maxlength="2" style="width:35px"></td>
                    <td><input name="day_end_time" value="<?php echo date('d',$pagevals['time']); ?>" type="text" maxlength="2" style="width:35px"></td>
                    <td><input name="mon_end_time" value="<?php echo date('m',$pagevals['time']); ?>" type="text" maxlength="2" style="width:35px"></td>
                    <td><input name="year_end_time" value="<?php echo date('Y',$pagevals['time']); ?>"  type="text" maxlength="4" style="width:35px"></td>
                </tr>
            </table>
         </td>
       </tr>
     </table>
         
         <br /><br />
         <center>
         <button class="btn" id="create_post" href="#"><span class="icon16 icomoon-icon-cog"></span> Create new post</button>
         <button class="btn" id="cancel" href="?r=post"><span class="icon16 icomoon-icon-cog"></span> Cancel</button>
         </center>
    </div>
    <div class="right-panel">
        <label for="normal" style="width:225px">Trạng thái</label>
        <select name="status" id="status" style="opacity: 0;">
            <option value="pending" selected="selected">Pending</option>
            <option value="approved">Approved</option>
            <option value="active">Active</option>
            <option value="blocked">Blocked</option>
        </select><br /><br />

        <label for="normal" style="width:225px">Danh mục</label>
        <select name="category_id" id="category_id" style="opacity: 0;">
            <?
                foreach($pagevals['selection_label']['category'] as $key=> $value){
                    echo '<option class="selection_label" value="'.$key.'">'.ucfirst($value).'</option>';
                }
            ?>
        </select><br /><br />

        <label for="normal" style="width:225px">Vị trí hiển thị</label>
        <select name="position" id="position" style="opacity: 0;">
            <option value="hot" selected="selected" >Hot</option>
            <option value="new">New</option>
            <option value="nomal">Nomal</option>
            <option value="top">Top</option>
            <option value="left">Left</option>
            <option value="right">Right</option>
        </select><br /><br />

        <label for="normal">Bình chọn</label>
        <select name="vote" id="vote" style="opacity: 0;">
            <option value="5" selected="selected">5</option>
            <option value="4">4</option>
            <option value="3">3</option>
            <option value="2">2</option>
            <option value="1">1</option>
        </select><br /><br />
        <label for="normal" styl>Bài viết Hot?</label>
        <select name="hot_status" id="hot_status" style="opacity: 0;">
            <option value="0">No</option>
            <option value="1" selected="selected">Yes</option> 
        </select>
    </div>
    <span style="clear: both"></span>
</form>